package com.xiyu.service.vo.restaurant.dish;

import com.xiyu.service.vo.restaurant.dish.baseVO.RestaurantDishBase;
import com.xiyu.service.vo.restaurant.dish.baseVO.RestaurantDishMaterialBase;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.Length;
import jakarta.validation.Valid;
import com.xiyu.service.enums.common.CommonStatusEnum;
import com.xiyu.service.framework.validation.InEnum;
import java.math.BigDecimal;

@Schema(description = "创建菜品")
@Data
public class DishCreateInput extends RestaurantDishBase {

    @Schema(description = "菜品原料")
    @Valid
    private List<material> materials;

    @Schema(description = "菜品原料")
    @Data
    @Valid
    public static class material extends RestaurantDishMaterialBase {

        @Schema(description = "蛋白质")
        @Digits(integer = 13, fraction = 4, message = "蛋白质格式无效")
        private BigDecimal protein;

        @Schema(description = "名称")
        @NotBlank(message = "菜品原料名称不能为空")
        @NotNull(message = "菜品原料名称不能为空")
        private String name;

        @Schema(description = "脂肪")
        @Digits(integer = 13, fraction = 4, message = "脂肪格式无效")
        private BigDecimal fat;

        @Schema(description = "热量")
        @Digits(integer = 13, fraction = 4, message = "热量格式无效")
        private BigDecimal heat;

        @Schema(description = "碳水化合物")
        @Digits(integer = 13, fraction = 4, message = "碳水化合物格式无效")
        private BigDecimal carbohydrate;
    }

}